Optimal. Leaf size=187 \[ \frac {1}{8} a^2 (6 A+7 B+8 C) x+\frac {a^2 (18 A+20 B+25 C) \sin (c+d x)}{15 d}+\frac {a^2 (6 A+7 B+8 C) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a^2 (18 A+25 B+20 C) \cos ^2(c+d x) \sin (c+d x)}{60 d}+\frac {A \cos ^4(c+d x) (a+a \sec (c+d x))^2 \sin (c+d x)}{5 d}+\frac {(2 A+5 B) \cos ^3(c+d x) \left (a^2+a^2 \sec (c+d x)\right ) \sin (c+d x)}{20 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.29, antiderivative size = 187, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 7, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.171, Rules used = {4171, 4102,
4081, 3872, 2715, 8, 2717} \begin {gather*} \frac {a^2 (18 A+20 B+25 C) \sin (c+d x)}{15 d}+\frac {a^2 (18 A+25 B+20 C) \sin (c+d x) \cos ^2(c+d x)}{60 d}+\frac {a^2 (6 A+7 B+8 C) \sin (c+d x) \cos (c+d x)}{8 d}+\frac {(2 A+5 B) \sin (c+d x) \cos ^3(c+d x) \left (a^2 \sec (c+d x)+a^2\right )}{20 d}+\frac {1}{8} a^2 x (6 A+7 B+8 C)+\frac {A \sin (c+d x) \cos ^4(c+d x) (a \sec (c+d x)+a)^2}{5 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2715
Rule 2717
Rule 3872
Rule 4081
Rule 4102
Rule 4171
Rubi steps
\begin {align*} \int \cos ^5(c+d x) (a+a \sec (c+d x))^2 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\frac {A \cos ^4(c+d x) (a+a \sec (c+d x))^2 \sin (c+d x)}{5 d}+\frac {\int \cos ^4(c+d x) (a+a \sec (c+d x))^2 (a (2 A+5 B)+a (2 A+5 C) \sec (c+d x)) \, dx}{5 a}\\ &=\frac {A \cos ^4(c+d x) (a+a \sec (c+d x))^2 \sin (c+d x)}{5 d}+\frac {(2 A+5 B) \cos ^3(c+d x) \left (a^2+a^2 \sec (c+d x)\right ) \sin (c+d x)}{20 d}+\frac {\int \cos ^3(c+d x) (a+a \sec (c+d x)) \left (a^2 (18 A+25 B+20 C)+2 a^2 (6 A+5 B+10 C) \sec (c+d x)\right ) \, dx}{20 a}\\ &=\frac {a^2 (18 A+25 B+20 C) \cos ^2(c+d x) \sin (c+d x)}{60 d}+\frac {A \cos ^4(c+d x) (a+a \sec (c+d x))^2 \sin (c+d x)}{5 d}+\frac {(2 A+5 B) \cos ^3(c+d x) \left (a^2+a^2 \sec (c+d x)\right ) \sin (c+d x)}{20 d}-\frac {\int \cos ^2(c+d x) \left (-15 a^3 (6 A+7 B+8 C)-4 a^3 (18 A+20 B+25 C) \sec (c+d x)\right ) \, dx}{60 a}\\ &=\frac {a^2 (18 A+25 B+20 C) \cos ^2(c+d x) \sin (c+d x)}{60 d}+\frac {A \cos ^4(c+d x) (a+a \sec (c+d x))^2 \sin (c+d x)}{5 d}+\frac {(2 A+5 B) \cos ^3(c+d x) \left (a^2+a^2 \sec (c+d x)\right ) \sin (c+d x)}{20 d}+\frac {1}{4} \left (a^2 (6 A+7 B+8 C)\right ) \int \cos ^2(c+d x) \, dx+\frac {1}{15} \left (a^2 (18 A+20 B+25 C)\right ) \int \cos (c+d x) \, dx\\ &=\frac {a^2 (18 A+20 B+25 C) \sin (c+d x)}{15 d}+\frac {a^2 (6 A+7 B+8 C) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a^2 (18 A+25 B+20 C) \cos ^2(c+d x) \sin (c+d x)}{60 d}+\frac {A \cos ^4(c+d x) (a+a \sec (c+d x))^2 \sin (c+d x)}{5 d}+\frac {(2 A+5 B) \cos ^3(c+d x) \left (a^2+a^2 \sec (c+d x)\right ) \sin (c+d x)}{20 d}+\frac {1}{8} \left (a^2 (6 A+7 B+8 C)\right ) \int 1 \, dx\\ &=\frac {1}{8} a^2 (6 A+7 B+8 C) x+\frac {a^2 (18 A+20 B+25 C) \sin (c+d x)}{15 d}+\frac {a^2 (6 A+7 B+8 C) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a^2 (18 A+25 B+20 C) \cos ^2(c+d x) \sin (c+d x)}{60 d}+\frac {A \cos ^4(c+d x) (a+a \sec (c+d x))^2 \sin (c+d x)}{5 d}+\frac {(2 A+5 B) \cos ^3(c+d x) \left (a^2+a^2 \sec (c+d x)\right ) \sin (c+d x)}{20 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.66, size = 132, normalized size = 0.71 \begin {gather*} \frac {a^2 (240 A c+420 B c+360 A d x+420 B d x+480 C d x+60 (11 A+12 B+14 C) \sin (c+d x)+240 (A+B+C) \sin (2 (c+d x))+90 A \sin (3 (c+d x))+80 B \sin (3 (c+d x))+40 C \sin (3 (c+d x))+30 A \sin (4 (c+d x))+15 B \sin (4 (c+d x))+6 A \sin (5 (c+d x)))}{480 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.11, size = 247, normalized size = 1.32
method | result | size |
risch | \(\frac {3 a^{2} A x}{4}+\frac {7 a^{2} B x}{8}+a^{2} x C +\frac {11 a^{2} A \sin \left (d x +c \right )}{8 d}+\frac {3 a^{2} B \sin \left (d x +c \right )}{2 d}+\frac {7 \sin \left (d x +c \right ) a^{2} C}{4 d}+\frac {a^{2} A \sin \left (5 d x +5 c \right )}{80 d}+\frac {a^{2} A \sin \left (4 d x +4 c \right )}{16 d}+\frac {\sin \left (4 d x +4 c \right ) a^{2} B}{32 d}+\frac {3 a^{2} A \sin \left (3 d x +3 c \right )}{16 d}+\frac {\sin \left (3 d x +3 c \right ) a^{2} B}{6 d}+\frac {\sin \left (3 d x +3 c \right ) a^{2} C}{12 d}+\frac {a^{2} A \sin \left (2 d x +2 c \right )}{2 d}+\frac {\sin \left (2 d x +2 c \right ) a^{2} B}{2 d}+\frac {\sin \left (2 d x +2 c \right ) a^{2} C}{2 d}\) | \(229\) |
derivativedivides | \(\frac {\frac {a^{2} A \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+a^{2} B \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a^{2} C \sin \left (d x +c \right )+2 a^{2} A \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {2 a^{2} B \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+2 a^{2} C \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+\frac {a^{2} A \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}+a^{2} B \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {a^{2} C \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}}{d}\) | \(247\) |
default | \(\frac {\frac {a^{2} A \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+a^{2} B \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a^{2} C \sin \left (d x +c \right )+2 a^{2} A \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {2 a^{2} B \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+2 a^{2} C \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+\frac {a^{2} A \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}+a^{2} B \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {a^{2} C \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}}{d}\) | \(247\) |
norman | \(\frac {-\frac {a^{2} \left (6 A +7 B +8 C \right ) x}{8}+\frac {5 a^{2} \left (6 A +7 B +8 C \right ) \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}+\frac {a^{2} \left (6 A +7 B +8 C \right ) \left (\tan ^{15}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}-\frac {a^{2} \left (6 A +7 B +8 C \right ) x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}+\frac {a^{2} \left (6 A +7 B +8 C \right ) x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}+\frac {3 a^{2} \left (6 A +7 B +8 C \right ) x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}-\frac {3 a^{2} \left (6 A +7 B +8 C \right ) x \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}-\frac {a^{2} \left (6 A +7 B +8 C \right ) x \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}+\frac {a^{2} \left (6 A +7 B +8 C \right ) x \left (\tan ^{14}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}+\frac {a^{2} \left (6 A +7 B +8 C \right ) x \left (\tan ^{16}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}-\frac {a^{2} \left (26 A +25 B +24 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {a^{2} \left (126 A +67 B +8 C \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}-\frac {a^{2} \left (126 A +355 B +200 C \right ) \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{60 d}-\frac {a^{2} \left (414 A -445 B -920 C \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{60 d}-\frac {a^{2} \left (882 A +245 B +760 C \right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{60 d}+\frac {a^{2} \left (942 A -85 B +40 C \right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{60 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}\) | \(468\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.32, size = 236, normalized size = 1.26 \begin {gather*} \frac {32 \, {\left (3 \, \sin \left (d x + c\right )^{5} - 10 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )} A a^{2} - 160 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} A a^{2} + 30 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{2} - 320 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} B a^{2} + 15 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} B a^{2} + 120 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a^{2} - 160 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} C a^{2} + 240 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} C a^{2} + 480 \, C a^{2} \sin \left (d x + c\right )}{480 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.35, size = 122, normalized size = 0.65 \begin {gather*} \frac {15 \, {\left (6 \, A + 7 \, B + 8 \, C\right )} a^{2} d x + {\left (24 \, A a^{2} \cos \left (d x + c\right )^{4} + 30 \, {\left (2 \, A + B\right )} a^{2} \cos \left (d x + c\right )^{3} + 8 \, {\left (9 \, A + 10 \, B + 5 \, C\right )} a^{2} \cos \left (d x + c\right )^{2} + 15 \, {\left (6 \, A + 7 \, B + 8 \, C\right )} a^{2} \cos \left (d x + c\right ) + 8 \, {\left (18 \, A + 20 \, B + 25 \, C\right )} a^{2}\right )} \sin \left (d x + c\right )}{120 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.52, size = 299, normalized size = 1.60 \begin {gather*} \frac {15 \, {\left (6 \, A a^{2} + 7 \, B a^{2} + 8 \, C a^{2}\right )} {\left (d x + c\right )} + \frac {2 \, {\left (90 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 105 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 120 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 420 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 490 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 560 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 864 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 800 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 1120 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 540 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 790 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 1040 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 390 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 375 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 360 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{5}}}{120 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.95, size = 289, normalized size = 1.55 \begin {gather*} \frac {\left (\frac {3\,A\,a^2}{2}+\frac {7\,B\,a^2}{4}+2\,C\,a^2\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+\left (7\,A\,a^2+\frac {49\,B\,a^2}{6}+\frac {28\,C\,a^2}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (\frac {72\,A\,a^2}{5}+\frac {40\,B\,a^2}{3}+\frac {56\,C\,a^2}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (9\,A\,a^2+\frac {79\,B\,a^2}{6}+\frac {52\,C\,a^2}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (\frac {13\,A\,a^2}{2}+\frac {25\,B\,a^2}{4}+6\,C\,a^2\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {a^2\,\mathrm {atan}\left (\frac {a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (6\,A+7\,B+8\,C\right )}{4\,\left (\frac {3\,A\,a^2}{2}+\frac {7\,B\,a^2}{4}+2\,C\,a^2\right )}\right )\,\left (6\,A+7\,B+8\,C\right )}{4\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________